﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SourceFile.aspx.cs" Inherits="WebSite_that_use_Wizard.NET.SourceFile"
    EnableSessionState="True"
    validateRequest=false %>

<%@ Register Src="Menu.ascx" TagName="Menu" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <uc1:Menu ID="Menu1" runat="server" />
        &nbsp;<asp:HyperLink ID="HyperLink1" runat="server">HyperLink</asp:HyperLink>
        <h1>
            SourceFile</h1>
        <br />
        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" CellPadding="4"
            DataSourceID="SourceFileDataSource" ForeColor="#333333" GridLines="None" Height="50px"
            Width="125px" DefaultMode="Edit" OnPageIndexChanging="DetailsView1_PageIndexChanging">
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <Fields>
                <asp:BoundField DataField="SourceFileId" HeaderText="SourceFileId" SortExpression="SourceFileId"
                    ReadOnly="True" />
                <asp:BoundField DataField="FileName" HeaderText="FileName" SortExpression="FileName" />
                <asp:CheckBoxField DataField="Compiled" HeaderText="Compiled" SortExpression="Compiled"
                    ReadOnly="True" />
                <asp:TemplateField ConvertEmptyStringToNull="False" HeaderText="SourceText" 
                    ShowHeader="False" SortExpression="SourceText">
                    <ItemTemplate>
                        Source:<br />
                        <asp:TextBox  ID="TextBox1" runat="server" Text='<%# Bind("SourceText") %>' TextMode="MultiLine"></asp:TextBox>
                    </ItemTemplate>
                    <ControlStyle Height="550px" Width="750px" />
                </asp:TemplateField>
                <asp:CommandField ShowEditButton="True" UpdateText="Save" />
            </Fields>
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#999999" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:DetailsView>
        <asp:ObjectDataSource ID="SourceFileDataSource" runat="server" SelectMethod="GetSourceFile"
            TypeName="WebSite_that_use_Wizard.NET.SourceFile+SourceFilePageHelper" 
            UpdateMethod="SaveSourceFile" onupdated="SourceFileDataSource_Updated">
            <UpdateParameters>
                <asp:SessionParameter DefaultValue="" Name="sessionDataStoreContext" SessionField="WizardEngine"
                    Type="Object" />
                <asp:QueryStringParameter DefaultValue="" Name="querySourceFileId" QueryStringField="id"
                    Type="Int32" />
                <asp:Parameter Name="FileName" Type="String" />
                <asp:Parameter Name="SourceText" Type="String" />
            </UpdateParameters>
            <SelectParameters>
                <asp:SessionParameter DefaultValue="" Name="sessionDataStoreContext" SessionField="WizardEngine"
                    Type="Object" />
                <asp:QueryStringParameter DefaultValue="" Name="querySourceFileId" QueryStringField="id"
                    Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    </form>
</body>
</html>
